<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script src="https://unpkg.com/vue@next"></script>
<body>
    <div id="root"></div>    
</body>
<script>
    const app = Vue.createApp({
     data() {
         return {
            message: '',
            count: 1,
            price: 5
         }
     },
     computed: {
         total() {
            //  return this.count * this.price
            return Date.now();
         }
     },
     methods: {
         getTotal() {
            // return this.count * this.price
            return Date.now();
         }
     },
     template: `
       <div>{{message}}--{{total}}</div>
     `
    });
    const vm = app.mount('#root')
 </script>
</html>


<!-- 

计算属性跟方法
计算属性只有依赖的属性值变化 计算属性才变化

方法 页面重新渲染就变化

 -->